<?php
/* @authorcode  codestrings
 * @copyright   Leyun internet Technology(Shanghai)Co.,Ltd
 * @license     http://www.dzzoffice.com/licenses/license.txt
 * @package     DzzOffice
 * @link        http://www.dzzoffice.com
 * @author      zyx(zyx@dzz.cc)
 */
if(!defined('IN_DZZ')) {
	exit('Access Denied');
}
include_once libfile('function/appquanxian');
$path=dzzdecode($_GET['path']);
$meta=IO::getMeta($path);
if($meta['name']){
	$navtitle=$meta['name'];
	$navtitle=str_replace(strrchr($navtitle, "."),"",$navtitle); 
}else{
	$navtitle='视频';
}
$patharr=explode(':',$path);
if($patharr[0]=='ftp'){
	$src=$_G['siteurl'].DZZSCRIPT.'?mod=io&op=getStream&path='.rawurldecode($_GET['path']).'&n=play.'.$_GET['ext'];
}else{
	$src=IO::getFileUri($path);
	$src=str_replace('-internal.aliyuncs.com','.aliyuncs.com',$src);
}
if($_GET['ext']=='mp4'){
	$type='mp4';
}elseif($_GET['ext']=='m4v'){
	$type='m4v';
}elseif($_GET['ext']=='flv'){
	$type='flv';
}elseif($_GET['ext']=='mkv'){
	$type='mkv';
}
	elseif($_GET['ext']=='ts'){
	$type='ts';
}elseif($_GET['ext']=='mp3'){
	$type='mp3';
}elseif($_GET['ext']=='wav' || $_GET['ext']=='flac' ){
	$type='audio/x-wav';
}elseif($_GET['ext']=='webm'){
	$type='video/webm';
}elseif($_GET['ext']=='ogv' || $_GET['ext']=='ogg'){
	$type='video/ogg';
}elseif($_GET['ext']=='m3u8' || $_GET['ext']=='HLS'){
	$type='application/x-mpegurl';
}
include template('index');

?>